Conversation
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (1)
🚧 Files skipped from review as they are similar to previous changes (1)
📝 WalkthroughWalkthroughAdded a Changes
Sequence Diagram(s)sequenceDiagram
participant ImmichApi
participant HttpClient as HttpClient
participant Request as HttpRequestMessage
participant URLBuilder as StringBuilder
ImmichApi->>URLBuilder: build request URL
ImmichApi->>ImmichApi: PrepareRequest(client, Request, URLBuilder)
ImmichApi->>URLBuilder: read url, parse path & query
alt path is album endpoint and no shared param
ImmichApi->>URLBuilder: append shared=true (? or &)
end
ImmichApi->>HttpClient: send Request with updated URL
HttpClient->>Request: execute HTTP call
Estimated code review effort🎯 2 (Simple) | ⏱️ ~8 minutes Poem
🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
There was a problem hiding this comment.
Actionable comments posted: 2
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.
Inline comments:
In `@ImmichFrame.Core/Api/ImmichApi.cs`:
- Around line 49-53: The current substring check using
url.Contains("shared=true") is brittle; in ImmichApi.cs locate the url and
urlBuilder usage (the block referencing url.Contains("/albums/") and urlBuilder)
and replace the naive check with proper query parsing: parse the URL's query
parameters (e.g., with QueryHelpers.ParseQuery or HttpUtility.ParseQueryString),
check for the "shared" key specifically, and if it's missing add shared=true, or
if present but not "true" update/replace it to "true" to avoid duplicates like
unshared=true or conflicting shared=false; then rebuild the URL/query string via
urlBuilder so the final URL contains a single correct shared=true parameter.
- Line 49: The check that looks for album collection requests only matches
"/albums/" and therefore misses URLs ending with "/albums"; update the
conditional that uses the variable url (in ImmichApi.cs) to detect album
collection paths by checking for "/albums" (e.g., change
url.Contains("/albums/") to url.Contains("/albums")) while keeping the existing
guard for "!url.Contains(\"shared=true\")" so shared=true is still not added
when present.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Path: .coderabbit.yaml
Review profile: CHILL
Plan: Pro
Run ID: 075c0628-bc2a-4a75-af37-85115cb20848
📒 Files selected for processing (1)
ImmichFrame.Core/Api/ImmichApi.cs
What are you trying to archieve here? Having shared not defined should result in showing both shared and not shared albums (API docs). Could you elaborate more? |
|
We are calling the |
This is only for albums, has nothing to do with search/random. You will still need to specify the album with this approach, I don't see any way around that. |
Yes, but what are you trying to archieve? |
If you don't specify shared=true, you will not get back any shared albums (as that API doc explains). Try it:
|
|
I think there might be a design flaw in immich but not a problem in ImmichFrame: I have a album that is shared to me from another account. This album will be shown if I add id in immichframe. The way the /albums API works rn: so the behaviour of shared=true feels off but should not be an issue in ImmichFrame. A album that was shared is still displayed correctly in ImmichFrame. |

closes #625
Summary by CodeRabbit